#ifndef _INTERF_DB_H_
#define _INTERF_DB_H_

struct AccountFields
{
	UINT64 _id;
	UINT64 _number;	
	UINT32 _createTime;
	UINT32 _status;
	e::String _pwd;
};

#define ACCOUNT_BASE_USER "base_user"

struct IDB
	: public IBase
{
	static e::db::IRecordSetPtr Query(
		e::db::IConnectionPoolPtr& pool
		, const e::String& sql);
};

struct IAccountDBAP
	: public IBase
{
	static IAccountDBAPPtr New(const e::String& dbConnStr);
	virtual bool isConnect() const = 0;
	
	virtual int QueryUserAccount(
		const UINT64& number
		, AccountFields& afields) = 0;
};

#endif